!include x64.nsh

Name "编玩边学Python助手"
Icon "python.ico"
OutFile "编玩边学Python助手.exe"

InstallDir "$PROGRAMFILES\CodePKu-Python-Helper"

; LicenseText "编玩边学软件使用许可协议"
; LicenseData "license.txt"
BrandingText "编玩边学"

ShowInstDetails show


; Page license
Page directory
Page instfiles

Section "" ;No components page, name is not important

  ; Set output path to the installation directory.
  SetOutPath $INSTDIR

  ; Put file there
  File /r Codepku-Python

  ; Exec $INSTDIR\CodePKu-HW-Helper\drivers\CH341SER.EXE
  
  
  SetOutPath $INSTDIR\CodePKu-Python
  CreateShortcut "$DESKTOP\编玩边学Python助手.lnk" "$INSTDIR\Codepku-Python\python.exe" "codepku-python.pyo" "$INSTDIR\Codepku-Python\python.ico" 0
  CreateShortcut "$INSTDIR\编玩边学Python助手.lnk" "$INSTDIR\Codepku-Python\python.exe" "codepku-python.pyo" "$INSTDIR\Codepku-Python\python.ico" 0
  WriteUninstaller "Uninst.exe"

SectionEnd ;

UninstPage uninstConfirm
UninstPage instfiles

UninstallText "您将卸载编玩边学Python助手，点击下一步继续。"
Section "Uninstall"
  Delete $INSTDIR\Uninst.exe ; delete self (see explanation below why this works)
  Delete "$DESKTOP\编玩边学Python助手.lnk"
  Delete "$INSTDIR\编玩边学Python助手.lnk"
  RMDir /r $INSTDIR\Codepku-Python
  RMDir $INSTDIR
SectionEnd
